package com._520it.crm.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com._520it.crm.domain.Driver;
import com._520it.crm.mapper.DriverMapper;
import com._520it.crm.service.IDriverService;

@Service
public class DriverServiceImpl implements IDriverService{
	@Autowired
	private DriverMapper mapper;
	@Override
	public int deleteByPrimaryKey(Long id, String drivingType) {
		return mapper.deleteByPrimaryKey(id, drivingType);
	}

	@Override
	public int insert(Driver record) {
		return mapper.insert(record);
	}

	@Override
	public Driver selectByPrimaryKey(Long id, String drivingType) {
		return mapper.selectByPrimaryKey(id, drivingType);
	}

	@Override
	public List<Driver> selectAll() {
		return mapper.selectAll();
	}

	@Override
	public int updateByPrimaryKey(Driver record) {
		return mapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Driver> selectPage(int current, int size, String name, String sex, String drivingType, String drivingNum, String occupation, Date birthDate, Date firstDate) {
		return mapper.selectPage(current,size,name,sex,drivingType,drivingNum,occupation,birthDate,firstDate);
	}

	@Override
	public int selectPageCount(int current, int size, String name, String sex, String drivingType, String drivingNum, String occupation, Date birthDate, Date firstDate) {
		return mapper.selectPageCount(current,size,name,sex,drivingType,drivingNum,occupation,birthDate,firstDate);
	}

}
